import { ElInput } from "element-plus";
import { h } from "vue";
import type { ConfigItem } from "./index.d";
const Input = (item: ConfigItem, data: any) => {
  return h(ElInput, {
    ...item,
    placeholder: "请输入" + item.label,
    clearable: true,
    modelValue: data[item.prop],
    "onUpdate:modelValue": newValue => {
      data[item.prop] = newValue;
    }
  });
};

export default Input;
